package com.gopay.common.cps.dao.cbrmb.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.cps.dao.cbrmb.CbRmbIntlCardAuditAssistDAO;
import com.gopay.common.domain.cbrmb.internationalcard.CbRmbIntlCardAuditAssist;

/**
 * 外卡拒付订单审核辅助表DAO实现类
 * @author b.zou 2017-11-13
 */
@Repository("cbRmbIntlCardAuditAssistDAO")
public class CbRmbIntlCardAuditAssistDAOImpl extends BaseDAOImpl<CbRmbIntlCardAuditAssist, String> implements CbRmbIntlCardAuditAssistDAO {

	@Override
	public CbRmbIntlCardAuditAssist findByGopayOrderId(String gopayOrderId) {
		String hql = "from CbRmbIntlCardAuditAssist where gopayOrderId =:gopayOrderId";
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("gopayOrderId", gopayOrderId);
		List<CbRmbIntlCardAuditAssist> list = findByHql(hql, param);
		if (list != null && list.size() > 0) {
			return list.get(0);
		} else {
			return null;
		}
	}

}
